
{if $smarty.get.id eq ""}
<!--show the feasts -->
{foreach from=$pizza_feasts item=items}
  <div  class="item-block">
    <div class="image">
      <a href="index.php?act=pizza-feasts&id={$items.id}" title="{$items.name}" >
        {if  $items.image == ""}
          <img src="images/no_image.gif" style="border:none"> 
        {else}
         <img src="UserFiles/Image/product_photos/{$items.image}" style="border:none"> 
        {/if}
      </a>
    </div>
    <div class="desc">
      <a href="index.php?act=pizza-feasts&id={$items.id}"  title="{$items.name}" >
        {$items.name|stripslashes}
      </a>
      <b>
        <a href="index.php?act=pizza-feasts&id={$items.id}"  title="{$items.name}"  style="margin-left:10px" >
          {$items.prices.0|trim|price_format}
        </a> 
      </b>
    </div>
  </div>
{/foreach}

<!--end feasts and show the pizza options -->
{else}

<script type="text/javascript" src="js/pizza-feasts-builder.js"></script>
<form id="pizzaform" method="post">
<input type="hidden" name="size" value="{$pizza_feasts.id}" />
<input type="hidden" name="pizza_name" value="{$pizza_feasts.name|stripslashes}" />
<div id="pizza-builder">
<h1>{$pizza_feasts.name|stripslashes}</h1>
<p>{$pizza_feasts.description|stripslashes}</p>
 {if $pizza_feasts.image  ne ""}
 <img src="UserFiles/Image/product_photos/{$pizza_feasts.image}" />
 {else}
   <img src="images/no_image.gif"  style="padding:20px"/>
        {/if}
<div class="pizza-sizes">
<p><strong>{$lang.pizzabuilder_choose}</strong></p>


<div>
  <label>{$lang.pizzafeasts_small}</label>
  <input class="calc" type="radio" name="base_price" value="{$pizza_feasts.prices.0}|{$lang.pizzafeasts_small}" checked="checked">
  {$pizza_feasts.prices.0|price_format}
  <em>{$pizza.0.topping_price|price_format} {$lang.pizzabuilder_per_topping}</em>
  {if $pizza.0.free_topping eq 1}
  <span style="color:green">{$lang.pizzabuilder_first_topping_free}</span>
  {/if}
</div>
<div>
  <label>{$lang.pizzafeasts_medium}</label>
  <input class="calc" type="radio" name="base_price" value="{$pizza_feasts.prices.1}|{$lang.pizzafeasts_medium}" >
  {$pizza_feasts.prices.1|price_format}
  <em>{$pizza.0.topping_price|price_format} {$lang.pizzabuilder_per_topping}</em>
  {if $pizza.0.free_topping eq 1}
  <span style="color:green">{$lang.pizzabuilder_first_topping_free}</span>
  {/if}
</div>
<div>
  <label>{$lang.pizzafeasts_large}</label>
  <input class="calc" type="radio" name="base_price" value="{$pizza_feasts.prices.2}|{$lang.pizzafeasts_large}" >
  {$pizza_feasts.prices.2|price_format}
  <em>{$pizza.0.topping_price|price_format} {$lang.pizzabuilder_per_topping}</em>
  {if $pizza.0.free_topping eq 1}
  <span style="color:green">{$lang.pizzabuilder_first_topping_free}</span>
  {/if}
</div>


<div>
  <label>{$lang.pizzabuilder_quantity_label}</label>
  <input type="text" name="quantity" value="1" size="5">
</div>
<div>
  <label>{$lang.pizzabuilder_who_question}</label>
  <input type="text" name="forwho" >
</div>
<div></div>
</div>
</div>
<h2>{$lang.pizzafeasts_additional_toppings_question}</h2>
<div id="pizza-container">
<div id="pizza-tabs">
	<ul>
		<li><a href="#tabs-1">{$lang.pizzabuilder_vegetable_label}</a></li>
		<li><a href="#tabs-2">{$lang.pizzabuilder_meat_label}</a></li>
		<li><a href="#tabs-3">{$lang.pizzabuilder_bread_label}</a></li>
	</ul>
	<div id="tabs-1">
    <div style="min-height:350px">
		<a name="tabs-1"></a>
        
    <p><strong>{$lang.pizzabuilder_additional_veg_toppings}</strong></p>
    
    <table width="100%" border="0" cellspacing="5" cellpadding="5">
  			  <tr>
            <td width="150"></td> 
        
             {if $pizza.sides.0 eq 1}
            
          <td style="text-align:center">  <img src="images/none.jpg" /><br />None</td>
          	{/if}
            {if $pizza.sides.1 eq 1}
            <td  style="text-align:center"><img src="images/left.jpg" /><br />Left</td>
          	{/if}
            {if $pizza.sides.2 eq 1}
            <td  style="text-align:center"> <img src="images/whole.jpg" /><br />Whole</td>
           	{/if}
            {if $pizza.sides.3 eq 1}
         <td  style="text-align:center">    <img src="images/right.jpg" /><br />Right</td>
          
            {/if}
          
  
</tr>
  
      {foreach from=$pizza.toppings item=veg}
      <tr>
        
        <td width="200">{$veg}
       
        </td>      
        {foreach from=$pizza.sides item=sides key=k}
       
        {if $k eq 0 and $sides eq 1}
        {assign value=$lang.pizzabuilder_none var="side"}
      
        {elseif $k eq 1 and $sides eq 1}
  
        {assign value=$lang.pizzabuilder_left  var="side"}
        {elseif $k eq 2 and $sides eq 1}
        
        {assign value=$lang.pizzabuilder_whole  var="side"}
        {elseif $k eq 3 and $sides eq 1}
       
        {assign value=$lang.pizzabuilder_right  var="side"}
        {/if}
         
        <td style="text-align:center">
          <input class="calc{if $k ne 0} topping{/if}" type="radio" name="topping[{$veg}]" {if $k eq 0} checked="checked" value=""  {else} value="{$veg} {$side} {$lang.pizzafeasts_side}|{$side}" {/if}>
        </td>
        {/foreach} 
                
      </tr>
      {/foreach}
 
      </table>

    
    
          
  <p><strong>{$lang.pizzabuilder_top_it_off}</strong></p>
   <table width="100%" border="0" cellspacing="5" cellpadding="5">
      <tr>
        <td width="150"></td> 
        {if $pizza.sides.0 eq 1}
        <td style="text-align:center"><img src="images/none.jpg" /><br />{$lang.pizzabuilder_none}</td>
        {/if}
        {if $pizza.sides.1 eq 1}
        <td style="text-align:center"><img src="images/left.jpg" /><br />{$lang.pizzabuilder_left}</td>
        {/if}
        {if $pizza.sides.2 eq 1}
        <td style="text-align:center"><img src="images/whole.jpg" /><br />{$lang.pizzabuilder_whole}</td>
        {/if}
        {if $pizza.sides.3 eq 1}
        <td style="text-align:center"><img src="images/right.jpg" /><br />{$lang.pizzabuilder_right}</td>
        {/if}
      </tr>
  
      {foreach from=$pizza.topoff item=veg}
        <tr>
                
        <td width="200">{$veg} </td>      
        {foreach from=$pizza.sides item=sides key=k}
               
        {if $k eq 0 and $sides eq 1}
        {assign value=$lang.pizzabuilder_none var="side"}
      
        {elseif $k eq 1 and $sides eq 1}
  
        {assign value=$lang.pizzabuilder_left  var="side"}
        {elseif $k eq 2 and $sides eq 1}
        
        {assign value=$lang.pizzabuilder_whole  var="side"}
        {elseif $k eq 3 and $sides eq 1}
       
        {assign value=$lang.pizzabuilder_right  var="side"}
        {/if}
                 
        <td style="text-align:center">
          <input class="calc{if $k ne 0} topping{/if}" type="radio" name="topping[{$veg}]"  {if $k eq 0} checked="checked" value=""  {else} value="{$veg} {$side} {$lang.pizzafeasts_side}|{$side}" {/if}>
        </td>
        {/foreach} 
                    
      </tr>
      {/foreach}

    </table>         
                 
                 
                              
         </div>        
                 
	</div>
	<div id="tabs-2">
    <div style="min-height:350px">
    
    <a name="tabs-2"></a>
    <p><strong>{$lang.pizzabuilder_additional_meat_toppings}</strong></p>
    <table width="100%" border="0" cellspacing="5" cellpadding="5">
      <tr>
        <td width="150"></td> 
        {if $pizza.sides.0 eq 1}
        <td style="text-align:center"><img src="images/none.jpg" /><br />{$lang.pizzabuilder_none}</td>
        {/if}
        {if $pizza.sides.1 eq 1}
        <td style="text-align:center"><img src="images/left.jpg" /><br />{$lang.pizzabuilder_left}</td>
        {/if}
        {if $pizza.sides.2 eq 1}
        <td style="text-align:center"><img src="images/whole.jpg" /><br />{$lang.pizzabuilder_whole}</td>
        {/if}
        {if $pizza.sides.3 eq 1}
        <td style="text-align:center"><img src="images/right.jpg" /><br />{$lang.pizzabuilder_right}</td>
        {/if}
      </tr>
  
      {foreach from=$pizza.meat_toppings item=veg}
      <tr>
        <td width="200">{$veg}</td>      
        {foreach from=$pizza.sides item=sides key=k}
        {if $k eq 0 and $sides eq 1}
        {assign value=$lang.pizzabuilder_none var="side"}
      
        {elseif $k eq 1 and $sides eq 1}
  
        {assign value=$lang.pizzabuilder_left  var="side"}
        {elseif $k eq 2 and $sides eq 1}
        
        {assign value=$lang.pizzabuilder_whole  var="side"}
        {elseif $k eq 3 and $sides eq 1}
       
        {assign value=$lang.pizzabuilder_right  var="side"}
        {/if}
               
        <td style="text-align:center">
          <input class="calc{if $k ne 0} topping{/if}" type="radio" name="topping[{$veg}]"  {if $k eq 0} checked="checked" value=""  {else} value="{$veg} {$side} Side|{$side}" {/if}>
        </td>
        {/foreach} 
                  
      </tr>
      {/foreach}
 
    </table>    
    </div>
    
    </div>
    
    <div id="tabs-3">
    <div style="min-height:350px">
    <a name="tabs-3"></a>
    <p><strong>{$lang.pizzabuilder_choose_bread}</strong></p>
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        {foreach from=$pizza.base item=veg key=k}
        <tr>
          <td width="200">{$veg}</td>      
          <td style="text-align:center"><input class="calc" type="radio" name="base" value="{$veg}"  {if $k eq 0} checked="checked"  {/if} ></td>
        {/foreach}
        </tr>
      </table>    
    </div>
</div>
</div>
</div>

<div class="pizza-sizes">

<div><label>{$lang.additional_instructions_message}</label>
  <textarea name="instructions" style="width:340px;height:60px"></textarea></div>
<div style="text-align:right;font-size:1.2em;margin-top:25px;">
  <label>{$lang.pizzabuilder_total_per_pizza}</label>
  <span id="pizza_price">{$pizzas.0.price|price_format}</span>
  <span class="button">
    <a href="" class="add-pizza">{$lang.pizzabuilder_add_button}</a>
  </span>
</div>

<div></div>

</div>
</form>
{/if}
